package com.fx.feign;


import com.fx.demo.common.resulUtils.ResultUtil;
import com.fx.dto.Student;
import com.fx.demo.common.resulUtils.AjaxResult;
import org.springframework.stereotype.Component;

import java.util.Collection;

@Component
public class FeignError implements FeignProviderClient {
    private final String defaultErrorMsg="服务器维护中，请稍后再试";

    @Override
    public AjaxResult<Collection<Student>> findAll(int start, int pageSize) {
        return ResultUtil.error(defaultErrorMsg);
    }

    @Override
    public String getPort() {
        return "defaultErrorMsg";
    }
    /*@Override
    public Collection<Student> findAll() {
        return null;
    }

    @Override
    public String index() {
        return "服务器维护中......";
    }*/
}